package com.yihukurama.sysbase.framework.domain;

import com.yihukurama.base.app.annotation.SqlWhere;
import com.yihukurama.sysbase.framework.entity.*;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 说明： UserEntity的领域对象
 * @Author: yihukurama
 */
@Data
public class User extends UserEntity{

    //登录时用的验证码uuid
    private String uuid;
    //登录时的验证码
    private String code;

    //岗位id
    private List<String> postIds;

    private List<PostEntity> postEntities;

    //角色id
    private List<String> roleIds;

    private List<RoleEntity> roleEntities;

    private DeptEntity deptEntity;
    /**
     * 正常账号状态: 正常
     */
    public static final Integer STATUS_1 = 1;

    /**
     * 正常账号状态: 禁用
     */
    public static final Integer STATUS_2 = 2;

    private List<MenuEntity> menus;
    private String token;
    private String currentAuthority;
    /**
     * 重置密码时必须传的参数
     */
    private Boolean resetPwd;

    @SqlWhere(value = SqlWhere.SqlWhereValue.LIKE, proprtityName = "username")
    @Override
    public String getUsername() {
        return super.getUsername();
    }
}
